import { defineStore } from "pinia";

export const useMenuStore = defineStore("menu", () => {
  // state
  let activeIndex = ref("4");
  // 饼状图
  let addchart = ref(1);
  const username = ref(null);
  const userType = ref(null);
  const keyWord = ref(null)
  const setUsername = (val) => {
    username.value = val;
  };
  const setUserType = (val) => {
    userType.value = val;
  };
  const setKeyword = (val) =>{
    keyWord.value = val
  }
  const setIndex = (val) => {
    activeIndex.value = val;
  };
  return {
    keyWord,
    activeIndex,
    setIndex,
    username,
    userType,
    addchart,
    setUsername,
    setUserType,
    setKeyword
  };
});
